import Vue from 'vue'
import Router from 'vue-router'
import Index from '../views/Index/Index'
import Word from '../views/Word/Word'
import List from '../views/List/List'
import Add from '../views/Add/Add'
import Card from '../views/Card/Card'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/index'
    },
    {
      path:'/index',
      component:Index
    },
    {
      path:'/word',
      component:Word,
      children:[
        {
          path:'/word',
          redirect:'/word/card'
        },
        {
          path:'/word/card',
          component:Card
        },
        {
          path:'/word/list',
          component:List
        },
        {
          path:'/word/add',
          component:Add
        }
      ]
    }
  ],
  mode:'history'
})
